#ifndef MANAGERWIDGET_H
#define MANAGERWIDGET_H

#include <QWidget>
#include <QList>
#include <QString>
#include <QDialog>
#include <QMessageBox>
#include <QStandardItem>
#include <QStandardItemModel>
#include "teacher.h"
#include "manager.h"
#include "file.h"
#include "modelset.h"
#include "manageraddnewcourse.h"
#include "manageraddnewperson.h"
#include "managermodifycourse.h"
#include "managermodifyperson.h"

namespace Ui {
class ManagerWidget;
}

class ManagerWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ManagerWidget(QWidget *parent = nullptr);

    ~ManagerWidget();

    void getLoginId(QString loginId);

    void setManageObject();

private slots:
    void on_btn_check_student_clicked();

    void on_btn_check_course_info_clicked();

    void on_btn_check_tea_info_clicked();

    void on_btn_exit_clicked();

    void on_btn_check_info_clicked();

    void on_btn_add_course_clicked();

    void on_btn_add_stu_or_tea_info_clicked();

    void on_btn_modify_stu_or_tea_info_clicked();

    void on_btn_modify_course_info_clicked();

    void sortView(int a);

    void on_btn_confirm_clicked();

    void on_btn_exit_check_clicked();

    void on_btn_modify_password_clicked();

    void on_btn_exit_2_clicked();

    void on_btn_confirm_2_clicked();

    void on_btn_check_tea_require_clicked();

    void on_btn_confirm_3_clicked();

    void on_btn_refuse_clicked();

    void on_btn_quit_clicked();

    void on_btn_delete_info_clicked();

private:
    Ui::ManagerWidget *ui;
    QStandardItemModel *model;
    QString loginId;
    file *file1;
    manager *managerInfo;
    modelSet *setM;
    managerAddNewCourse *addView1;
    managerAddNewPerson *addView2;
    managerModifyCourse *modifyView1;
    managerModifyPerson *modifyView2;
    bool flag=0;
};

#endif // MANAGERWIDGET_H
